<template>
  <div>
    <head-top head-title="指标列表" go-back='true'></head-top>
      <group> 
        <cell title="行车指标"   :link="{ path: '/net/drive'}"  value-align='left'  is-link> </cell>              
         <cell title="客流主要指标"  :link="{ path: '/net/passenger'}"  value-align='left'   is-link></cell>            
         <cell title="其他指标"  :link="{ path: '/net/otherKpi'}" value-align='left'   is-link></cell>
         <cell title="运营生产重要信息"  :link="{ path: '/net/infoKpi'}"  value-align='left'   is-link></cell>
         <cell title="其他事项"  :link="{ path: '/net/other'}"  value-align='left'   is-link></cell>
        <!-- <cell title="督办事项"  :link="{ path: ''}"  value-align='left'   is-link></cell>
         <cell title="设备设施故障数据"  :link="{ path: ''}"  value-align='left'   is-link></cell>-->     
      </group>
      <transition name="router-slid" mode="out-in">
            <router-view></router-view>
    </transition>
  </div>
</template>
<script>
  import { fetchDetail} from "@/mob/dtarget";
  import headTop from "src/components/head";
  import { Cell } from 'vux';
  //import store from './store/index';
  import { Group } from 'vux';  
  import vue from "vue";
  export default{
    components:{
      headTop,Cell,Group
    },
    data() {
      return {
      listLoading: null,
      list: null,    
      total: null,
       temp: {
        id: undefined,
        date: ""       
      },
      date:undefined          
    };
    },
    created(){ 
      this.date= this.$route.query.date;//接收传过来的日期参数
      fetchDetail(this.date).then(response => {//以date为参数，去 fetchDetail中获取后台数据 
        if (response.status === 200) {
          var list1 = response.data.content.replace(/\s/g,""); //去掉数据库数据的空白字符  
          // this.list = JSON.parse(response.data.content);//将String类型转换为json格式
          this.list = JSON.parse(list1);//将String类型转换为json格式
          //console.log("this.list1", this.list);
          // console.log("response", response);
          this.$store.commit("setList",this.list);//讲数据保存到内存$store中
        } else {
          console.log(response);
          this.$notify({
            title: "未找到数据，请确认日期",
            message: response.status + response.data.msg,
            type: "error",
            duration: 200000
          });
        }
      });






    },
    methods: {
       

  }
};
</script>